<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnProvincesAndCitiesInTenantAuthenticationTable extends AbstractMigration
{
    public function up()
    {
        $this->table('tenant_authentication')
            ->addColumn('province', 'string', ['limit' => 32, 'default' => '', 'comment' => '省级'])
            ->addColumn('cities', 'string', ['limit' => 32, 'default' => '', 'comment' => '市级'])
            ->addColumn('coordinate', 'string', ['limit' => 32, 'default' => '', 'comment' => '坐标'])
            ->save();
    }

    public function down()
    {
        $this->table('tenant_authentication')
            ->removeColumn('province')
            ->removeColumn('cities')
            ->removeColumn('coordinate')
            ->save();

    }
}
